# -*- coding: utf-8 -*-
"""
@Time: 2025/1/10 11:37
@Auth: Zhang Hongxing
@File: app.py.py
@Note:   
"""
from flask import Flask
from flask_cors import CORS
from api.ocr_routes import ocr_routes
from api.analysis_routes import analysis_routes
from api.user_routes import user_routes
from backend.api.visualization_routes import visualization_routes

app = Flask(__name__)
CORS(app)  # 允许跨域

# 注册路由
app.register_blueprint(ocr_routes)
app.register_blueprint(analysis_routes)
app.register_blueprint(user_routes)
app.register_blueprint(visualization_routes)

if __name__ == "__main__":
    # 指定在5003端口上运行
    app.run(debug=True, port=5003)

# from flask import Flask
# from flask_cors import CORS
# from api.analysis_routes import analysis_routes
#
# app = Flask(__name__)
# CORS(app)  # 允许跨域
#
# # 注册路由
# app.register_blueprint(analysis_routes)
#
# if __name__ == "__main__":
#     app.run(debug=True, port=5001)

